<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" name="单击" id="btn" value="单击">
<input type="button" name="双击" id="btn2" value="双击">
</body>

<script>
   let btn=document.getElementById("btn");
   btn.onclick=function (){
      document.write("单击")
   }



   let btn2=document.getElementById("btn2");
   btn2.ondblclick=function (){
       document.write("双击")
   }



</script>


</html>